using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class cadastros : System.Web.UI.Page
{
    int abaAtiva;
    protected void Page_Load(object sender, EventArgs e)
    {
        this.abaAtiva = this.TabContainer1.ActiveTabIndex;
        //this.ScriptManager1.RegisterAsyncPostBackControl(this.TabContainer1);
        this.TabContainer1.ActiveTabIndex = 1;
    }

    protected void ActiveTabChanged(object sender, EventArgs e)
    {
        string paginaParaRedirecionar = "cadastros.aspx";

        switch (this.abaAtiva)
        {
            case 0:
                paginaParaRedirecionar = "inicio.aspx";
                break;
            case 1:
                paginaParaRedirecionar = "cadastros.aspx";
                break;
            case 2:
                paginaParaRedirecionar = "consultas.aspx";
                break;
        }
        Response.Redirect(paginaParaRedirecionar);
    }
}
